import Vue from 'vue'
import VueRouter from 'vue-router'
import ReMusic from '../components/ReMusic.vue'

Vue.use(VueRouter);


const routes = [
  {
    path: '/',
    name: 'ReMusic',
    component:
      ReMusic,
    meta: {            
      keepAlive: true  // 通过此字段判断是否需要缓存当前组件  
    }    
  },

  {
    path: '/playlist',
    name: 'playlist',
    component: () => import(/* webpackChunkName: "about" */ '../views/playlist.vue')
  },

    {
      path: '/Down_load',
      name: 'Down_load',
      component: () => import(/* webpackChunkName: "about" */ '../views/Down_load.vue'),
  },
  {
    path: '/Hot_music_list',
    name: 'Hot_music_list',
    component: () => import('../views/HotMusicList'),
    meta: {            
      keepAlive: true  // 通过此字段判断是否需要缓存当前组件  
    } 
  },
  // {
  //   path: "/musicList/:id/:idx",
  //   name: "musicList",
  //   component: ()=> import('../components/musicList')
  // },
  // {
  //   path: '/Search',
  //   name: 'Search',
  //   component: () => import(/* webpackChunkName: "about" */ '../views/Search.vue')
  // },
  {
    path: '/Search',
    name: 'Search',
    component: () => import("../views/Search.vue"),
  },
  {
    path: '/Login',
    name: 'Login',
    component: () => import("../views/Login.vue")
  },
  {
    path:'/detailsList',
    name:'detailsList',
    component:() => import("../views/detailsList.vue")
  }
]

const router = new VueRouter({
  routes
})

export default router;
